<?php
use App\User;
use App\Models\Project_info as Project_info;
use App\Http\Controllers\std\SelectController;

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/	

Route::get('/', function () {
    return view('auth/login');
});


###################Auth验证路由信息############
// Authentication routes...
Route::get('auth/login', 'Auth\AuthController@authenticate');
Route::post('auth/login', 'Auth\AuthController@authenticate');
Route::get('auth/logout', 'Auth\AuthController@getLogout');

// Registration routes...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');


#主页路由
Route::get('std/home',function(Request $request){
	
	$data=Project_info::where('editable','=',0)->get();
	return view('std/home',['data'=>$data]);
});

Route::get('thr/home',function(Request $request){
	return view('thr/home');
});	
Route::get('admin/home',function(Request $request){
	return view('admin/home');
});

#下载文档
Route::get('/help_doc/{name}','StdController@downloads');
Route::get('/argue_book/{name}/{real}','StdController@downloads');

Route::get('/downloads/{name}/{real}','ThrController@downloads');

#
Route::get('layouts/sidebar',function(){
	return view('layouts/sidebar');
});
Route::get('layouts/container',function(){
	return view('layouts/container');
});

###############项目信息路由###########3######
Route::get('std_pro_detail/{pid}','ProController@std_detail');
Route::get('thr_pro_detail/{pid}','ProController@thr_detail');



#######################################学生端路由信息################################################

#选择项目
Route::get('std/std_select','StdController@index');

#项目申报
Route::get('std/apply','StdController@apply');
Route::get('std/delete_apply','StdController@delete_apply');

#开题报告
Route::get('std/start_report','StdController@start_report');
Route::get('std/start_entry/{report_type}','StdController@start_entry');
Route::get('std/start_write','StdController@start_write');
Route::post('std/start_write','StdController@start_write');

#进展记录
Route::get('std/process_record','StdController@process_record');
Route::get('std/process_add','StdController@process_add');


#中期检查表
Route::get('std/mid_report','StdController@mid_report');
Route::get('std/mid_entry/{report_type}','StdController@mid_entry');
Route::get('std/mid_write','StdController@mid_write');
Route::post('std/mid_write','StdController@mid_write');


#结题报告
Route::get('std/final_report','StdController@final_report');
Route::get('std/final_entry/{report_type}','StdController@final_entry');
Route::get('std/final_write','StdController@final_write');
Route::post('std/final_write','StdController@final_write');


#经费预算
Route::get('std/fees_predict','StdController@fees_predict');
Route::get('std/modify_fees','StdController@modify_fees');
Route::post('std/modify_fees','StdController@modify_fees');

#成果跟踪
Route::get('std/result_check','StdController@result_check');
Route::get('std/result_entry','StdController@result_entry');
Route::get('std/result_track','StdController@result_track');
Route::post('std/result_track','StdController@result_track');


#展板提交
Route::get('std/panels_check','StdController@panels_check');
Route::get('std/panels_entry','StdController@panels_entry');
Route::get('std/panels_submit','StdController@panels_submit');
Route::post('std/panels_submit','StdController@panels_submit');




################信息交流模块
#收件箱
Route::get('std/rec_box','StdController@rec_box');


#发件箱
Route::get('std/snd_box','StdController@snd_box');


################账户管理模块
#修改密码
Route::get('std/modify_pwd','StdController@modify_pwd');
Route::get('thr/modify_pwd','ThrController@modify_pwd');

#修改个人信息
Route::get('std/modify_info','StdController@modify_info');
Route::get('thr/modify_info','ThrController@modify_info');


#######################################教师端路由信息################################################
#######################################教师端路由信息################################################
Route::get('thr/home','ThrController@index');


###################选择学生###############################
Route::get('thr/confirm/{pid}','ThrController@confirm');
Route::post('thr/confirm/{pid}','ThrController@confirm');
Route::post('thr/select_group_guide/{pid}','ThrController@select_group_guide');

#######################发布新项目#############################
Route::get('thr/pro_pub','ThrController@pro_pub');
Route::post('thr/pro_pub','ThrController@pro_pub');

#####################审核开题报告###########################
Route::get('thr/confirm_start/{pid}','ThrController@confirm_start');
Route::post('thr/confirm_start/{pid}','ThrController@confirm_start');

#####################审核中期检查表###########################
Route::get('thr/confirm_mid/{pid}','ThrController@confirm_mid');
Route::post('thr/confirm_mid/{pid}','ThrController@confirm_mid');

#####################审核结题报告###########################
Route::get('thr/confirm_end/{pid}','ThrController@confirm_end');
Route::post('thr/confirm_end/{pid}','ThrController@confirm_end');

#####################审核成果跟踪###########################
Route::get('thr/confirm_result/{pid}','ThrController@confirm_result');
Route::post('thr/confirm_result/{pid}','ThrController@confirm_result');

#####################审核展板提交###########################
Route::get('thr/confirm_panels/{pid}','ThrController@confirm_panels');
Route::post('thr/confirm_panels/{pid}','ThrController@confirm_panels');

#经费预算
Route::get('thr/fees','ThrController@fees');
Route::get('thr/modify_fees/{pid}','ThrController@modify_fees');
Route::post('thr/fees','ThrController@fees');

############################修改项目#########################
Route::get('thr/modify_pro/{pid}','ThrController@modify_pro');
Route::post('thr/modify_pro/{pid}','ThrController@modify_pro');
############################删除项目#########################
Route::get('thr/delete_pro/{pid}','ThrController@delete_pro');

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {
    //
});
